<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="http://js.arcgis.com/3.14/esri/css/esri.css">
    <title>ArcGIS加载高德在线地图</title>
    <style>
        html, body, #map {
            height: 100%;
            width: 100%;
            margin: 0;
            padding: 0;
        }
    </style>
</head>
<body>
<div id="map"></div>
<script type="text/javascript">
    var dojoConfig = {
        async: true,
        parseOnLoad: true,
        packages: [{
            name: "extLayers",
            location: location.pathname.replace(/\/[^/]*$/, '') + '/extLayers'
        }]
    };
</script>
<script src="http://js.arcgis.com/3.14/"></script>
<script>
    require(["esri/map", "extLayers/gaodeLayer", "dojo/domReady!"], function (Map, gaodeLayer) {
        var map = new Map("map", {
            center: [116, 28],
            zoom: 5
        });
        var baselayer = new gaodeLayer();//默认加载矢量 new gaodeLayer({layertype:"road"});也可以
        //var baselayer = new gaodeLayer({layertype: "st"});//加载卫星图
        //var baselayer = new gaodeLayer({layertype: "label"});//加载标注图
        map.addLayer(baselayer);//添加高德地图到map容器
    });
</script>
</body>
</html>
© 2018 GitHub, Inc.